home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Utilities / Installers / InstallerMaker™ 3.0 / Preinstalled version / Customizing InstallerMaker / Sample Code / Headers / IMExtensionsFor3_0.h < prev    next >
Encoding:
Text File  |  1996-04-21  |  6.7 KB  |  220 lines  |  [TEXT/MMCC]

  1. /******************************************************************************
  2. **
  3. **  Project Name:    InstallerMaker Extensions for IM 3.0
  4. **     File Name:    IMExtensionsFor3_0.h
  5. **
  6. **   Copyright© 1994-1996 Aladdin Systems, inc.
  7. **
  8. **
  9. **   Description:    Header for InstallerMaker code resources. Note that
  10. **                     if you compile for Symantec or Metrowerks code
  11. **                    resources, you'll need your code resource's entry point
  12. **                    to be declared as "main".  So to use this header correctly,
  13. **                    you'll need to "redefine" the appropriate function name.
  14. **                    For the IBeg, this would look something like this:
  15. **                    
  16. **                    #ifndef __IM3_EXTENSIONS
  17. **                      #define IBEG_MAIN main
  18. **                      #include "IMExtensionsFor3_0.h"
  19. **                    #endif
  20. **
  21. **                    We also recommend looking at the enclosed "A4Globals.h"
  22. **                    header file, which makes it possible (1) to write a code
  23. **                    resource that compiles without change in both the Metrowerks
  24. **                    and Symantec environments, and (2) can make it easier for
  25. **                    you to test your code by allowing the same function to be
  26. **                    called as "main" if compiling as a code resource, or some
  27. **                    other name if you are calling your code from within a
  28. **                    test program.  See our sample code for more about this.    
  29. **
  30. **
  31. *******************************************************************************
  32. **                       A U T H O R   I D E N T I T Y
  33. *******************************************************************************
  34. **
  35. **    Initials    Name
  36. **    --------    -----------------------------------------------
  37. **    RMT            Robert Thorne
  38. **
  39. **
  40. *******************************************************************************
  41. **                      L E G A L   N I C E T I E S
  42. *******************************************************************************
  43.  
  44.     This source code is (c) 1995-1996 Aladdin Systems, Inc.  You are free to use it 
  45.     in connection with your own products and distribute it in either source code 
  46.     or object code form.  However, this source code and accompanying written 
  47.     materials (including instructions for use) are provided "as is" without 
  48.     warranty of any kind.  Further, Aladdin Systems does not warrant, or make 
  49.     representations regarding the use, or the results of the use, of the source 
  50.     code or written materials in terms of correctness, accuracy, reliability, 
  51.     currentness, or otherwise.  No oral or written information or advice given 
  52.     by Aladdin Systems or its employees shall create a warranty, and you may not 
  53.     rely on such information or advice.
  54.     
  55.     Neither Aladdin Systems nor anyone else who has been involved with the 
  56.     creation, production, or delivery of the source code shall be liable for 
  57.     any direct, indirect, consequential, or incidental damages (including damages 
  58.     for loss of business profits, business interruption, loss of business 
  59.     information, and the like) arising out of the use or the inability to use the 
  60.     source code even if Aladdin Systems has been advised of the possibility of 
  61.     such damages.  Because some states do not allow the exclusion or limitation 
  62.     of liability for consequential or incidental damages or the limitations of 
  63.     duration of implied warranty, the above limitations may not apply to you.
  64.  
  65.  
  66. *******************************************************************************
  67. **                      R E V I S I O N   H I S T O R Y
  68. *******************************************************************************
  69. **
  70. **      Date        Time    Author    Description
  71. **    --------    -----    ------    ---------------------------------------------
  72. **    03/14/94            RMT        First draft for IM 1.0.1 and early 2.0ß
  73. **    04/07/94            RMT        Added "called after" parameter for 2.0b3
  74. **    12/30/94            RMT        Converted to IM 3.0 calls as of 12/28/94
  75. **    01/03/95            RMT        Added IDst and renamed the info structure
  76. **  07/26/95            RMT        Changed ILoc calling conventions.
  77. **
  78. ******************************************************************************/
  79.  
  80. /*****
  81.  
  82. // Extension Prototypes.  Note that the appropriate code resource build
  83. // needs to #define the appropriate Ixxx_MAIN as "main".  For example, to
  84. // build an IBeg code resource in CodeWarrior, do the following:
  85.  
  86. #define IBEG_MAIN main
  87. #include "IMExtensions256.h"
  88.  
  89. // Resource ID for all IM 3.0 code is 256.  Use of any other value may give
  90. // you and your users indigestion!!
  91.  
  92.  
  93. ******/
  94.  
  95. #ifndef __IM3_EXTENSIONS
  96. #define __IM3_EXTENSIONS
  97.  
  98.  
  99.  
  100. /****
  101.  
  102. IMEnvironsRec Structure
  103. =======================
  104.  
  105. This structure is used by various atoms.
  106.  
  107. Unless otherwise noted, the meaning of the fields is:
  108.  
  109. packages: an array of four long unsigned integers, used to represent which
  110.           packages are selected.
  111.  
  112. The userVol/userDir specifies the user selected folder or user selected volume.  
  113. In the latter case, userDir will be 2L.
  114.  
  115. The userSysVol/userSysDir specifies the potentially blessed folder on the user
  116. specified system vol, if the developer allows the user to make this choice.
  117. Otherwise, it specifies the blessed folder on the startup volume.
  118.  
  119. ****/
  120.  
  121. typedef struct {
  122.     unsigned long *packages ;
  123.     short userVol;
  124.     long userDir;
  125.     short userSysVol;
  126.     long userSysDir;
  127. } IMEnvironsRec ;
  128.  
  129.  
  130. // For ICnd, IMid:
  131. #define  kOkToContinue 0
  132. #define  kSkipThisItem 1
  133. #define  kCancelInstallation 2
  134.  
  135. // State codes for IMid 256
  136.     enum {
  137.         IMID_BEFORE = 0,
  138.         IMID_AFTER = 1,
  139.         IMID_BEFORE_DELETE = 2,
  140.         IMID_BEFORE_COPY = 4,
  141.         IMID_AFTER_COPY = 5,
  142.         IMID_BEFORE_MOVE = 6,
  143.         IMID_AFTER_MOVE = 7
  144.     };
  145.  
  146.  
  147. // Flags for ICnd
  148. #define kCnd2Flag 4
  149. #define kCnd1Flag 2
  150. #define kCnd0Flag 1
  151.  
  152. // Status codes to return from an ILoc 256
  153.     enum {
  154.         kILoc_UseParameters = 0, // point to the folder referenced in the parameters
  155.         kILoc_ChooseDefaultUserFolder = 1, // If called to set user folder
  156.         kILoc_SkipThisItem = 1, // If called as a custom destination
  157.         kILoc_AbortInstall = 2
  158.     } ;
  159.  
  160.         
  161. // For IFst, IBeg, IEnd
  162. #define  kWasNotAborted 0
  163. #define  kWasAborted 1
  164.  
  165. #ifdef __cplusplus
  166. extern "C" {
  167. #endif
  168.  
  169.  
  170.  
  171. pascal short IFST_MAIN ( unsigned long *refCon ) ;
  172.  
  173.  
  174. pascal short IBEG_MAIN (unsigned char *pw , 
  175.                         unsigned long *refCon ) ;
  176.  
  177.  
  178. pascal short ICND_MAIN (short flags, 
  179.                         unsigned long *packages,
  180.                         unsigned long *refcon) ;
  181.                 
  182.  
  183. pascal void  IPKG_MAIN(    unsigned long *packages,
  184.                         unsigned long *refcon) ;    
  185.             
  186.  
  187.  
  188. pascal short IMID_MAIN (IMEnvironsRec *environs,
  189.                         short *destVol,
  190.                         long *destDir,
  191.                         short isFolder,
  192.                         unsigned char *name,
  193.                         unsigned long creationDate,
  194.                         unsigned long modificationDate,
  195.                         OSType type,
  196.                         OSType creator,
  197.                         short after,
  198.                         short tag,
  199.                         unsigned long *refcon ) ;
  200.  
  201.  
  202. pascal short IEND_MAIN (short abort,
  203.                         IMEnvironsRec *environs,
  204.                         short *restartFlag,
  205.                         unsigned long *refcon )    ;
  206.  
  207.                         
  208. pascal short ILOC_MAIN ( IMEnvironsRec *environs,
  209.                         short *destVol,
  210.                         long *destDir,
  211.                         short *killDestinationPrompt,
  212.                         unsigned long *refcon );
  213.                  
  214.                         
  215. #ifdef __cplusplus
  216. }
  217. #endif
  218.  
  219. #endif
  220.